Skip to content

fix(kitty-keyboard): Shift+non-English letter parsed as BaseCode instead of the original#122

Open
aka-rider wants to merge 1 commit into
charmbracelet:mainfrom
aka-rider:main
Open

fix(kitty-keyboard): Shift+non-English letter parsed as BaseCode instead of the original#122
aka-rider wants to merge 1 commit into
charmbracelet:mainfrom
aka-rider:main

Conversation

@aka-rider

Copy link
Copy Markdown

This is the issue in an essense

  Code=1081(й) BaseCode=113(q) ShiftedCode=113(q) Mod=1 Text="q" KeyStr="q" Keystroke="q"
  Code=1094(ц) BaseCode=119(w) ShiftedCode=119(w) Mod=1 Text="w" KeyStr="w" Keystroke="w"
  Code=1091(у) BaseCode=101(e) ShiftedCode=101(e) Mod=1 Text="e" KeyStr="e" Keystroke="e"
  Code=1082(к) BaseCode=114(r) ShiftedCode=114(r) Mod=1 Text="r" KeyStr="r" Keystroke="r"
  Code=1077(е) BaseCode=116(t) ShiftedCode=116(t) Mod=1 Text="t" KeyStr="t" Keystroke="t"
  1. I removed fallthrough because ShiftedCode has been already set by another Param, at was just rewritten by the BaseCode.

  2. I'm not entirely sure if I handled Text correctly, the logic is to have original й -> Й instead of 'q'

go test ./... works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant